﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using VatTuDTO;
using VatTuBUS1;

namespace CungUngXayDung.admin
{
    public partial class admin : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
        }
        protected void btn_signin_Click(object sender, EventArgs e)
    {
        lbl_thongbao.Text = "";
        NguoiDungDTO dto = new NguoiDungDTO();
        string TenDangNhap = txt_user.Text.ToString();
        string MatKhau = txt_pass.Text.ToString();
        NguoiDungBUS nd = new NguoiDungBUS();
        dto = nd.SelectNguoiDung(TenDangNhap, MatKhau);
        if (TenDangNhap != "" || MatKhau != "")
            if (dto != null)
            {
                Response.Redirect("~/Default.aspx");
            }
            else
                lbl_thongbao.Text = "mat khau hoac password chua dung";   
        else
            lbl_thongbao.Text = "mat khau hoac password khong duoc rong"; 
    }
        }
    
}